/*对于没有类型声明的值，TypeScript 会进行类型推断，很多时候得到的结果，未必是开发者想要的。*/
type T = "a" | "b" | "c"
let foo: string = "a"
let bar: T = foo as T

const image: HTMLImageElement = document.querySelector('.img') as HTMLImageElement
console.log(image)


type D = string | null
const result: D = '哈哈哈' as string
console.log(result.length)
